package org.example.zpqy.controll;

import org.example.zpqy.dto.HistoryResultDTO;
import org.example.zpqy.service.RecognitionHistoryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;

@RestController
public class HistoryController {
    @Resource
    private RecognitionHistoryService historyService;

    @GetMapping("/history/results")
    // 修改返回类型为DTO列表
    public List<HistoryResultDTO> getAllResults() {
        return historyService.getAllHistoryResults();
    }
}